package lesson3.com.demo.lang;

import java.io.*;

public class RuntimeProcessExample {

    public static void main(String[] args) throws IOException {
        Runtime rt = Runtime.getRuntime();
        java.io.File f = new java.io.File("build/classes");
        Process p = rt.exec("serialver -classpath %CLASSPATH%;"+f.getAbsolutePath()+" lesson3.com.demo.ser.Dog");
        InputStreamReader reader =
                new InputStreamReader(p.getInputStream());

        BufferedReader buf_reader =
                new BufferedReader(reader); 
        String line;
        while ((line = buf_reader.readLine()) != null) {
            System.out.println(line);
        }


    }
}
